<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
<head>
<meta http-equiv="Content-Language" content="es-ar">
<meta http-equiv="Content-Type"
	content="text/html; charset=windows-1252">
<title>Insert title here</title>
</head>

<script type="text/javascript">
	function validar() {
		if ("<c:out value="${error.mensaje}"/>" != "") {
			alert(<c:out value="${error.mensaje}"></c:out>);
		}
	}
</script>

<script type="text/javascript">
	function cargar() {
		if ("<c:out value="${ban.mensaje}"/>" != 1) {
			document.myform.submit();
		} else {
			document.myform.estado.value = "cargado";
		}

	}
</script>

<body onload="cargar(); validar();">

	<jsp:useBean id="error" scope="request"
		class="ar.edu.utn.frgp.beans.MessageBean" />
	<jsp:useBean id="lista_servicios" scope="request"
		class="ar.edu.utn.frgp.beans.ServicioBean" />

	<form action="Servicios" name="myform" method="post">

		<input type="hidden" name="estado" value="vacio">

		<table border="1" width="100%">
			<tr>
				<td align="center" width="441">ID_Servicio</td>
				<td align="center" width="441">Servicio</td>
				<td align="center" width="441">Monto</td>
			</tr>

			<c:forEach items="${lista_servicios.servicio}" var="s">
				<tr align="center">
				
					<td align="center" width="441">&nbsp; 
					<input type="radio" name="rb_servicio" value="${s.id_servicio}">
					<input type=text
						align="middle" name="Id_servicio" value="${s.id_servicio}"
						readonly="readonly">
					</td>
					<td align="center" width="441">&nbsp; <input type=text
						align="middle" name="descripcion" value="${s.descripcion}"
						readonly="readonly">
					</td>
					<td align="center" width="441">$ <input type=text
						align="middle" name="montoFijo" value="${s.montoFijo}"
						readonly="readonly">
					</td>
				</tr>
			</c:forEach>

			<tr>
				<td align="center" width="1323" colspan="3"><input type=submit
					name="abonar" value="Pagar" ></td>
			</tr>
		</table>

	</form>


</body>
</html>